package com.zlzxm.shoesmarket.view.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.zlzxm.shoesmarket.R;
import com.zlzxm.shoesmarket.view.adapter.entity.EntityMarketMark;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * Created by zlz
 * on  4/12/21
 */
public class ADMarketMark extends BaseQuickAdapter<EntityMarketMark, BaseViewHolder> {

    public ADMarketMark(@Nullable List<EntityMarketMark> data) {
        super(R.layout.item_market_mark, data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder holder, EntityMarketMark entityMarketMark) {

        ImageView ivMark = holder.getView(R.id.ivMark);

        Glide.with(getContext())
                .load(entityMarketMark.getUrl())
                .centerCrop()
                .into(ivMark);
    }
}
